﻿<Window x:Class="MouseMove.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:MouseMove"
    Title="Window1" Height="600" Width="800">
    <Grid x:Name="MainPanel">
        <Grid.Resources>
            <TransformGroup x:Key="ImageTransformResource">
                <ScaleTransform />
                <TranslateTransform />
            </TransformGroup>
        </Grid.Resources>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Rectangle Grid.Column="0" x:Name="MasterImage"
                   MouseLeftButtonDown="MasterImage_MouseLeftButtonDown"
                   MouseLeftButtonUp="MasterImage_MouseLeftButtonUp"
                   MouseMove="MasterImage_MouseMove"
                   MouseWheel="MasterImage_MouseWheel">
            <Rectangle.Fill>
                <VisualBrush Transform="{StaticResource ImageTransformResource}" Stretch="Uniform">
                    <VisualBrush.Visual>
                        <Image Source="C:\Users\Administrator\Desktop\200877101721541_2.jpg" />
                    </VisualBrush.Visual>
                </VisualBrush>
            </Rectangle.Fill>
        </Rectangle>
        <Rectangle Grid.Column="1"
                   MouseLeftButtonDown="MasterImage_MouseLeftButtonDown"
                   MouseLeftButtonUp="MasterImage_MouseLeftButtonUp"
                   MouseMove="MasterImage_MouseMove"
                   MouseWheel="MasterImage_MouseWheel">
            <Rectangle.Fill>
                <VisualBrush Transform="{StaticResource ImageTransformResource}" Stretch="Uniform">
                    <VisualBrush.Visual>
                        <Image Source="C:\Users\Administrator\Desktop\200877101721541_2.jpg" />
                    </VisualBrush.Visual>
                </VisualBrush>
            </Rectangle.Fill>
        </Rectangle>
    </Grid>
</Window>